{% extends "vkontakte/layout.html" %}
{% load live_engine %}
{% load news %}
{% load urls %}
{% load comments %}

{% block head_title %}{{ record.title }} &raquo; {{ LIVE_ENGINE_DEFAULT_TITLE }}{% endblock %}
{% block head_description %}{{ record.meta_description|default:LIVE_ENGINE_DEFAULT_META_DESCRIPTION }}{% endblock %}
{% block head_keywords %}{{ record.meta_keywords|default:LIVE_ENGINE_DEFAULT_META_KEYWORDS }}{% endblock %}

{% block content %}
    <div class="plus-block breadcrumbs">
        <a rel="nofollow" href="{% url apps.news.views.base.main %}" title="{{ LIVE_ENGINE_DEFAULT_TITLE }}">Главная</a>
        &raquo;
        <a href="{% url apps.news.views.base.category record.category.url %}" title="{{ record.category.meta_title|default:record.category.title }}">{{ record.category.title }}</a>
        &raquo;
        <span>{{ record.title }}</span>
    </div>

    <div class="story">
        <div class="header">
            <span class="orange"><a href="{% url apps.news.views.base.category record.category.url %}" title="{{ record.category.title }}">{{ record.category.title }}</a></span>
            &rarr;
            <h1>{{ record.title }}</h1>
        </div>
        <div class="options">
            <ul class="plus-block">
                <li class="icon-author">{{ record.author.username }}</li>
                <li class="icon-date"><a href="{% url apps.news.views.base.calendar record.publish_date.year record.publish_date.month record.publish_date.day %}" title="Материалы за {{ record.publish_date|date:"d E 2011" }}">{{ record.publish_date|date:"d E 2011" }}</a></li>
                <li class="icon-views">{{ record.views }}</li>
                <li id="rating-news-{{ record.pk }}" class="right rating">
                    <img class="rating-button left" src="{{ STATIC_URL }}images/icon-down.gif" title="Уменьшить рейтинг: {{ record.title }}" alt="Уменьшить рейтинг: {{ record.title }}" onclick="updateNewRecordRating({{ record.pk }}, 1); return false;">
                    <span class="green value">{{ record.rating }}</span>
                    <img class="rating-button left" src="{{ STATIC_URL }}images/icon-up.gif" title="Увеличить рейтинг: {{ record.title }}" alt="Уменьшить рейтинг: {{ record.title }}" onclick="updateNewRecordRating({{ record.pk }}, 0); return false;">
                </li>
            </ul>
        </div>
        <div class="cut">
            {{ record.full_story|safe }}
        </div>
        {% if user.is_staff %}
            <div class="options">
                <ul class="plus-block">
                    <li class="right"><a href="{% url apps.news.views.admin.edit record.pk %}" title="Редактировать: {{ record.title }}">Редактировать</a></li>
                </ul>
            </div>
        {% endif %}
        <!--noindex-->
        <div class="related">
            {% related_news record %}
        </div>
        <!--/noindex-->
        <!--noindex-->
        <div class="comments">
            <h2>Комментарии:</h2>
            {% comments record.pk user %}
        </div>
        <!--/noindex-->
    </div>
{% endblock %}
